/*
* @File Name steppersIP.h
* @File Path M:\MAS2\PRM_Robotic_Arm\PRMCcode\coding\stepper\stepperDriver\steppersIP.h
* @Author: DDK
* @Date:   2018-12-16 18:45:22
* @Last Modified by:   Ruige_Lee
* @Last Modified time: 2019-04-17 14:53:48
* @Email: 295054118@whut.edu.cn"
*/


#ifndef _STEPPERSIP_H_
#define _STEPPERSIP_H_

#include <stdint.h>

#include "xil_io.h"



#define AXI_STEPPER_BASE 0x43c00000

#define STEPPERA_CFG_DRIVER_ENA_OFFSET				24*4
#define STEPPERA_CFG_POWER_ON_OFFSET			   25*4
#define STEPPERB_CFG_DRIVER_ENA_OFFSET				26*4
#define STEPPERB_CFG_POWER_ON_OFFSET			   27*4
#define STEPPERB_CFG_RESET_OFFSET			   28*4


extern uint32_t pl_stepper_param_write( uint8_t robot, uint8_t axis, int16_t pluseCnt );
extern uint32_t pl_stepper_param_read( uint8_t robot, uint8_t axis );

extern void pl_stepper_powerOn(uint8_t robot);
extern void pl_stepper_powerOff(uint8_t robot);
extern void pl_stepper_safty_enable(uint8_t robot);
extern void pl_stepper_safty_disable(uint8_t robot);
extern void pl_stepper_reset();
extern void pl_stepper_set();

#endif
